export function formatUTC (utcDateString) {
  const date = new Date(utcDateString)
  const options = {
    year: 'numeric',
    month: '2-digit',
    day: '2-digit',
    hour: '2-digit',
    minute: '2-digit',
    second: '2-digit',
    timeZone: 'Asia/Shanghai',
    hour12: false // 将小时显示为24小时制
  }
  return date.toLocaleString('zh-CN', options).replace(/\//g, '-') // 将斜杠替换为短横线
}
export function getNight (date1, date2) {
  const oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
  const start = new Date(date1)
  const end = new Date(date2)
  const diffDays = Math.round(Math.abs((start - end) / oneDay))
  const nights = diffDays - 1 // 减去第一晚上
  return nights
}
